﻿#include "SDL.h"
#include "klua/klua.h"
#include "klbbase/klb_base.h"
#include "libge2d.h"


#if defined(WIN32) && defined(DEBUG_VLD)
#include "vld.h"
#endif

static int klbge2d_main_openlibs(lua_State* L)
{
    klua_loadlib_all(L);

    klua_loadlib(L, luaopen_libge2d, "libge2d");

    return 0;
}

int main(int argc, char *argv[])
{
    klb_base_init(NULL);            // klb
    SDL_Init(SDL_INIT_EVERYTHING);  // SDL

    int ret = klua_main(argc, argv, klbge2d_main_openlibs);

    SDL_Quit();
    klb_base_quit();

    return ret;
}
